package com.suke.czx.modules.tb.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ZhouWenTao
 * @create 2025-05-16 19:17
 */
@Data
public class ProductVO {
    @ApiModelProperty(value = "商品ID (主键, 自增)")
    @JsonProperty(value = "id")
    public Long id;

    @ApiModelProperty(value = "发布者用户ID (外键关联sys_user.id)")
    @JsonProperty(value = "userId")
    public String userId;

    @ApiModelProperty(value = "商品分类ID (外键关联tb_category.id)")
    @JsonProperty(value = "categoryId")
    public Integer categoryId;

    @ApiModelProperty(value = "商品标题")
    @JsonProperty(value = "title")
    public String title;

    @ApiModelProperty(value = "商品描述")
    @JsonProperty(value = "description")
    public String description;

    @ApiModelProperty(value = "价格")
    @JsonProperty(value = "price")
    public BigDecimal price;

    @ApiModelProperty(value = "运费价格")
    @JsonProperty(value = "shippingFee")
    public BigDecimal shippingFee;

    @ApiModelProperty(value = "原价 (可选)")
    @JsonProperty(value = "originalPrice")
    public BigDecimal originalPrice;

    @ApiModelProperty(value = "商品图片链接 (多个URL用逗号分隔或JSON数组)")
    @JsonProperty(value = "imageUrls")
    public String imageUrls;

    @ApiModelProperty(value = "发布地点 (如：城市)")
    @JsonProperty(value = "location")
    public String location;

    @ApiModelProperty(value = "商品状态 (available-可售, pending-待确认, sold-已售, delisted-已下架)")
    @JsonProperty(value = "status")
    public String status;

    @ApiModelProperty(value = "想要次数")
    @JsonProperty(value = "wantCount")
    public Integer wantCount;


    @ApiModelProperty(value = "浏览次数")
    @JsonProperty(value = "viewCount")
    public Integer viewCount;

    @ApiModelProperty(value = "是否可议价 (1-是, 0-否)")
    @JsonProperty(value = "isNegotiable")
    public Integer isNegotiable;

    // 运费
    @ApiModelProperty(value = "是否包邮 (1-是, 0-否)")
    @JsonProperty(value = "isFreeShipping")
    public Integer isFreeShipping;

    // 自提
    @ApiModelProperty(value = "是否支持自提 (1-是, 0-否)")
    @JsonProperty(value = "isSelfPickup")
    public Integer isSelfPickup;

    // 收藏数量
    @ApiModelProperty(value = "收藏数量")
    @JsonProperty(value = "favoriteCount")
    public Integer favoriteCount;

    @ApiModelProperty(value = "点赞数量")
    @JsonProperty(value = "likeCount")
    public Integer likeCount;

    // 是否已收藏
    @ApiModelProperty(value = "是否已收藏 (1-是, 0-否)")
    @JsonProperty(value = "isFavorited")
    public Integer isFavorited = 0;

    @ApiModelProperty(value = "是否已点赞 (1-是, 0-否)")
    @JsonProperty(value = "isLiked")
    public Integer isLiked = 0;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty(value = "createDate")
    public Date createDate;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty(value = "updateDate")
    public Date updateDate;

    @ApiModelProperty(value = "卖家信息")
    public SellerVO seller;
}
